<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
    <services>
        <service id="symfonycasts.verify_email.token_generator" class="SymfonyCasts\Bundle\VerifyEmail\Generator\VerifyEmailTokenGenerator" public="false">
            <argument>%kernel.secret%</argument>
        </service>

        <service id="symfonycasts.verify_email.query_utility" class="SymfonyCasts\Bundle\VerifyEmail\Util\VerifyEmailQueryUtility" public="false" />

        <service id="symfonycasts.verify_email.uri_signer" class="Symfony\Component\HttpKernel\UriSigner">
            <argument>%kernel.secret%</argument>
            <argument>signature</argument>
        </service>

        <service id="SymfonyCasts\Bundle\VerifyEmail\VerifyEmailHelperInterface" alias="symfonycasts.verify_email.helper" />

        <service id="symfonycasts.verify_email.helper" class="SymfonyCasts\Bundle\VerifyEmail\VerifyEmailHelper">
            <argument type="service" id="router" />
            <argument type="service" id="symfonycasts.verify_email.uri_signer" />
            <argument type="service" id="symfonycasts.verify_email.query_utility" />
            <argument type="service" id="symfonycasts.verify_email.token_generator" />
            <argument /> <!-- verify user signature lifetime -->
        </service>
    </services>
</container>
